Kaggriculture town rebalance - #1394
Merged
Merged
Conversation
Replay analysis of 62 top-leaderboard episodes showed town demand outrunning farm supply by ~930 units over a season (coverage ratio 0.71), with players only out-supplying the town on 6 of 30 days. Three changes bring supply and demand roughly into balance: 1. Town center rate is flat 1x for the whole season -- the 2x-after-day-10 / 4x-after-day-20 ramp is gone. 2. Town center buys once per day (townCenterSellInterval 12 -> 24) instead of twice. 3. Shops are drawn with replacement, so the same shop can unlock more than once and each instance consumes independently. Unlocking is capped at 8 total instances. Together these put projected coverage at ~0.96 against the observed supply. unlocked_shops may now contain repeats. The default visualizer keeps one slot per shop name and badges duplicated slots with an instance count.
The town grid has exactly 8 shop slots, matching MAX_SHOP_INSTANCES, so every unlocked instance can have its own building instead of sharing a per-shop-name slot with an "x3" count badge. Slots are now generic positions filled in unlock order rather than being bound to a fixed shop, so three farmers' markets render as three separate buildings. SURROUNDING_BUILDINGS (slot index -> shop) becomes SHOP_BUILDINGS (shop key -> sprite/label) plus TOWN_SHOP_SLOT_ORDER for the fill order. Removes the .town-shop-count badge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Town center rate is flat 1× for the whole season. The 2× after day 10 / 4× after day 20 ramp (TOWN_CENTER_DEMAND_SCHEDULE) is removed.
Town center buys once per day. townCenterSellInterval 12 → 24, so with the default turnsPerDay = 24 there's exactly one center tick per day instead of two.
Shops are drawn with replacement. _end_of_day no longer filters out already-unlocked shops, so the same shop can unlock repeatedly and each instance consumes independently — a season might end up with three farmers' markets and no yarn store. Unlocking is capped at 8 total instances (new MAX_SHOP_INSTANCES), which is where the old "one of each of 8 shops" ceiling effectively sat.